var express = require('express');
var router = express.Router();
var _ = require('underscore');
var Model = require('../models/movie');

router.get("/:id", function (req, res, next) {
    var id = req.params.id;
    if (id !== 'undefined') {
        Model.findById(id, function (err, movie) {
            res.render("details", {
                title: "详情页",
                movie: movie
            })
        });
    }
});
module.exports = router;